package com.atcper

/**
 * @author : ranzlupup
 * @date : 2023/2/24 09:23
 */
object Scala13_Tuple {
    def main(args: Array[String]): Unit = {

        //        val t1: Tuple2[String, Int] = ("a", 1)
        val t1: (String, Int) = ("a", 1)
        val map1 = Map("a" -> 1, "b" -> 2, "c" -> 3)
        val map2 = Map(("a", 1), ("b", 2), ("c", 3))

        def map1Read(tuple2: (String, Int)): Unit = {
            println(tuple2._1 + "=" + tuple2._2)
        }

        map1.foreach(tuple => {
            println(tuple._1 + "=" + tuple._2)
        })

        map2.foreach(tuple => {
            println(tuple._1 + "=" + tuple._2)
        })
    }

}
